﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;

[ServiceContract]
public interface IService
{
    [OperationContract]
    Floor[] GetFloors();
}

[DataContract]
public class Floor
{
    [DataMember(Name = "id", Order = 0)]
    public string Id { get; set; }
    [DataMember(Name = "name", Order = 1)]
    public string Name { get; set; }
    [DataMember(Name = "accessPoints", Order = 2, EmitDefaultValue = false)]
    public AccessPoint[] AccessPoints { get; set; }
}

[DataContract]
public class AccessPoint
{
    [DataMember(Name = "id", Order = 0)]
    public string Id { get; set; }
    [DataMember(Name = "name", Order = 1)]
    public string Name { get; set; }
    [DataMember(Name = "count", Order = 2)]
    public int Count { get; set; }
}
